<template>
  <el-container class="app-container patrol-route">
    <el-header>
      <el-button type="primary" @click="reback">返回</el-button>
    </el-header>
    <el-container>
      <el-aside class="patrol-route__info">
        <el-form ref="form" :model="routeInfo" label-width="80px">
          <el-form-item label="线路名称">
            <!-- <el-input v-model="routeInfo.lrName"></el-input> -->
            <span>{{ routeInfo.lrName }}</span>
          </el-form-item>
          <el-form-item label="数据中心">
            <!-- <el-input v-model="routeInfo.lrDataCenter"></el-input> -->
            <span>{{ routeInfo.lrDataCenter }}</span>
          </el-form-item>
          <el-form-item label="所含机房">
            <el-tag
              v-for="line in routeInfo.lrMachine"
              :key="line"
              type="info"
              >{{ line }}</el-tag
            >
          </el-form-item>
          <el-form-item label="创建人">
            <!-- <el-input v-model="routeInfo.lrCreater"></el-input> -->
            <span>{{ routeInfo.lrCreater }}</span>
          </el-form-item>
          <el-form-item label="创建时间">
            <!-- <el-date-picker
            v-model="routeInfo.lrTime"
            type="date"
            placeholder="选择日期时间"
            disabled
          >
          </el-date-picker> -->
            <span>{{ parseTime(routeInfo.lrTime, "{y}-{m}-{d}") }}</span>
          </el-form-item>
        </el-form>
      </el-aside>
      <el-main class="patrol-route__show">
        <cesium-com></cesium-com>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import CesiumCom from "@/components/CesiumCom";

export default {
  name: "PatrolRouteDetail",
  components: {
    CesiumCom,
  },
  data() {
    return {
      routeInfo: {},
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      this.initRouteDetail();
    },
    initRouteDetail() {
      this.routeInfo = this.$route.params.routerData;
    },
    reback() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="scss" scoped>
.patrol-route {
  height: 100%;
  &__info {
    width: 300px;
    margin-bottom: 0;
  }
  &__show {
    padding: 0;
  }
}
</style>
